﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using HelpCentral.Shared.Interfaces;
using HelpCentral.Core.Services;
using HelpCentral.Configuration;
using HelpCentral.Shared.Validation;

namespace HelpCentral.Tester
{
    class Program
    {
        static void Main(string[] args)
        {
            //var cs = new ClientService();
            //var c = cs.GetClients(false).FirstOrDefault();

            //if (c == null)
            //{
            //    c = CoreContainer.ResolveNew<IClient>();

            //    c.License = Guid.NewGuid();
            //    c.Name = "My new client";
            //    c.ActivateDate = DateTime.Now;
            //    c.DeactivateDate = DateTime.Now.AddDays(30);
            //}
            //else
            //{
            //    c.Name = c.Name + " updated!";
            //    c.DeactivateDate = DateTime.Now.AddDays(30);
            //    c.ActivateDate = DateTime.Now;
            //}

            //try
            //{
            //    cs.SaveClient(c);
            //    Console.WriteLine("Success");
            //}
            //catch (ValidationException ex)
            //{
            //    Console.WriteLine("Validation error: " + ex.Message);
            //}

            var us = new UserService();
            us.CreateSystemUser();

            Console.ReadLine();
        }
    }
}
